<template>
  <div>
    <div class="top">
      <i class="iconfont icon-toggle" @click="fun()"></i>
      <input type="text" placeholder="读读经典" v-model="keyword" @keydown.13="gogogo()">
    </div>
  </div>
</template>

<script>
import {getdata} from '@/api/getlink.js'
export default {

    data(){
        return {
            keyword:""
        }
    },
    methods:{
        fun(){
            this.$router.go(-1)
        },
        gogogo(){
            getdata("/proxy/playlist/playListByName",{name:this.keyword}).then(ok=>{
                this.$router.push({path:"/searchMusicList",query:{obj:JSON.stringify(ok.data.data) }})
                console.log(ok.data.data)
            })
        }
    }
};
</script>

<style scoped>

div{
    margin-top:  0.3rem;
}
.top{
    height: 0.6rem;
    line-height: 0.6rem;
    margin: auto;
    width: 6.66rem;
    margin-bottom: 0.36rem;
}
input{
    border-bottom: 1px solid black;
    width: 5.82rem;
    font-size: 0.36rem;
}
i{
    margin-right:0.3rem;
    font-size: 0.4rem;
}
</style>
